#include "courier_add.h"
#include "ui_courier_add.h"

Courier_add::Courier_add(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Courier_add)
{
    socket = SocketManager::getinstance().socket();
    ui->setupUi(this);
}

Courier_add::~Courier_add()
{
    delete ui;
}

void Courier_add::on_pushButton_clicked()
{
    sendRig ddata;
    ddata.type=3;
    const char* acc = ui->lineEdit->text().toUtf8().constData();
    const char* id = ui->lineEdit_2->text().toUtf8().constData();
    const char* ctele = ui->lineEdit_3->text().toUtf8().constData();
    const char* rtele = ui->lineEdit_4->text().toUtf8().constData();
    strcpy(ddata.Account,acc);
    strcpy(ddata.ID,id);
    strcpy(ddata.tele,ctele);
    strcpy(ddata.teletwo,rtele);
    QByteArray message;
    message.append((char*)&ddata,sizeof (sendRig));
}
